#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
from infrastructure.utils.dateUtil import getNowDateStr


class Sqlite3Config:
    dbPath: str = "C:/Users/banban/projects/market-sentiment/db/stock_market_sentiment.sqlite"


class ServiceConfig:
    host: str = "localhost"
    port: int = 5000
    debug: bool = True


class ReportConfig:
    reportPath: str = "C:\\Users\\banban\\reports"


class XueQiuConfig:
    xueqiu_token: str = "cccb558956c11f5aaf8b9a30bcf1f214117e8d67" # xq_a_token
    u: str = "661701091038765"


class FlaskConfiguration:
    templateFolder: str = "../templates"


class LogConfiguration():
    logTime: str = None
    @classmethod
    def init(cls):
        if cls.logTime is None:
            cls.logTime = getNowDateStr()
        return None

    logPath: str = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'log')

    format: str = "<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | <level>{level: <8}</level> | <cyan>{name}</cyan>:<cyan>{function}</cyan>:<cyan>{line}</cyan> - <level>{message}</level>"

LogConfiguration.init()